Imports System.Windows.Forms

Public Class frmNgayLamViec
    Public frmParent As MscHTMenu.Menu
    Public sWorkTime As String = String.Empty

    Private Sub Login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If sWorkTime = String.Empty Then
            txtNgay_lam_viec.Value = Now()
        Else
            txtNgay_lam_viec.Value = sWorkTime
        End If
    End Sub

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdNhan.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        clientManager.Config.WorkTime = txtNgay_lam_viec.Value
        Login.sWorkTime = txtNgay_lam_viec.Value        
        clientManager.SaveConfiguration(sConfigurationFile)
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdHuy.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

End Class
